package test04.demo01;

import java.util.concurrent.TimeUnit;

public class Main {
    public static void main(String[] args) throws InterruptedException {
        MyThread myThread = new MyThread();
        myThread.start();
        TimeUnit.SECONDS.sleep(10);
        // 终止线程
        System.out.println("程序结束");
        myThread.interrupt();
    }
}
